<%@page import="com.portlet.service.quycachSPLocalServiceUtil"%>
<%@page import="com.portlet.service.nguyenlieuLocalServiceUtil"%>
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%>
<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui"%>
<%@page import="java.util.*"%>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page pageEncoding="UTF-8" %>
<%@page import="com.portlet.model.*"%>
<portlet:defineObjects />
<%
	int countNL=nguyenlieuLocalServiceUtil.getnguyenlieusCount();
	List<nguyenlieu>listNL=nguyenlieuLocalServiceUtil.getnguyenlieus(0, countNL);

	int countQC=quycachSPLocalServiceUtil.getquycachSPsCount();
	List<quycachSP>listQC=quycachSPLocalServiceUtil.getquycachSPs(0, countQC);
%>
<h4>Them chi tiet quy cach</h4>

<portlet:actionURL name="addNLQC" var="actionNLQCURL">
</portlet:actionURL>
<aui:form action="<%=actionNLQCURL.toString()%>" method="post">
	<aui:input name="maNLQC" label="Ma NLQC" type="text" id="maNLQC"></aui:input>
	<aui:select name="maQC" label="Ma Quy Cach" id="selectedQC">
		<%for(quycachSP nl:listQC){ %>
		<aui:option value="<%=nl.getMaQC() %>" label="<%=nl.getTenQC() %>" />
		<%}%>
	</aui:select>
	<br />
	<aui:select name="maNL" label="Ma Nguyen Lieu" id="selectedNL">
		<%for(nguyenlieu nl:listNL){ %>
		<aui:option value="<%=nl.getMaNguyenLieu() %>"
			label="<%=nl.getTenNguyenLieu() %>" />
		<%}%>
	</aui:select>
	<br>
	<aui:input name="quycach" id="quycach" type="text" label="Quy cach"></aui:input>
	<aui:input name="tieuchikiemtra" id="tckt" type="text" label="Tieu chi kiem tra"></aui:input>
	<aui:input name="cachkiemtra" id="cachkt" type="text" label="Cach kiem tra"></aui:input>
	<aui:input type="submit" name="Save" value="Save" />
</aui:form>


<portlet:renderURL var="viewHomeURL">
	<portlet:param name="mvcPath" value="/viewNLQC.jsp" />
</portlet:renderURL>
<p>
	<a href="<%=viewHomeURL%>">Back</a>
</p>